//
//  HCScrollMenuBar.h
//  DFMarketModule
//
//  Created by Hotacool on 2017/9/28.
//  Copyright © 2017年 Hotacool Tea Party. All rights reserved.
//

#import <UIKit/UIKit.h>

@class HCScrollMenuBar;
@protocol HCScrollMenuBarDelegate <NSObject>
@optional
- (void)scrollMenuBar:(HCScrollMenuBar*)scrollMenuBar selectAtIndex:(NSInteger)index ;
- (void)clickFucButtonOfScrollMenuBar:(HCScrollMenuBar*)scrollMenuBar ;
- (void)clickAddButtonOfScrollMenuBar:(HCScrollMenuBar*)scrollMenuBar ;
- (void)scrollMenuBarEndScroll:(HCScrollMenuBar *)scrollMenuBar;
@end
@interface HCScrollMenuBar : UIView
@property (nonatomic, strong) NSMutableArray *buttonsArray;//选项按钮数组
@property (nonatomic, strong, readonly) UIScrollView *scrollView;
@property (nonatomic, strong, readonly) UIButton *fucButton;
@property (nonatomic, copy, readonly) NSArray *itemArray;
@property (nonatomic, assign, readonly) NSInteger selectIndex;
@property (nonatomic, weak) id<HCScrollMenuBarDelegate> delegate;
@property (nonatomic, strong) UIColor *titleColorNormal;
@property (nonatomic, strong) UIColor *titleColorSelect;
@property (nonatomic, strong) UIColor *titleBackgroundColorSelect;
@property (nonatomic, strong) UIColor *indicatorColor;
@property (nonatomic, strong) UIFont *titleFontNormal;
@property (nonatomic, assign) BOOL hasFucButton;
@property (nonatomic, assign) BOOL hasAddButton;

@property (nonatomic, assign) CGFloat itemWidth;//自定义item宽度
@property (nonatomic, assign) CGFloat funcWidth;//自定义func宽度
@property (nonatomic, assign) CGFloat leftMargin;//左边间隙

- (instancetype)initWithItemArray:(NSArray*)itemArray ;

- (void)resetItemArray:(NSArray*)itemArray ;

- (void)setSelectIndex:(NSInteger)selectIndex withAnimation:(BOOL)animation ;
@end
